{include file="public/header" /}
<script type="text/javascript">
    var upload_max = 7;//可上传图片最大数量
</script>
<div id="dcWrap">
    <!--包含公共模版-->
    {include file="public/lefter" /}
    <div id="dcMain">
        <!-- 当前位置 -->
        {js href="__PUBLIC__/js/jquery.autotextarea.js" /}
        <div id="urHere"><a>管理中心</a><b>></b><strong>修改产品</strong></div>
        <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
            <h3><a href="{:url('product/index')}" class="actionBtn">产品列表</a>修改产品</h3>

            <form>
                <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                    <tr>
                        <td width="90" align="right">产品名称</td>
                        <td>
                            <input type="text" name="title" value="{$item.title}" size="80" class="inpMain" required />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">产品分类</td>
                        <td>
                            <select name="cid">
                                <option value="0">未分类</option>
                                {volist name="category" id="fcat"}
                                <option value="{$fcat.id}" {if condition="$item['cid'] eq $fcat['id']"}selected{/if}> {$fcat.name}</option>
                                <!--二级分类-->
                                {if condition="isset($fcat.children)"}
                                {volist name="fcat['children']" id="scat"}
                                <option value="{$scat.id}" {if condition="$item.cid eq $scat['id']" }selected{/if}>&nbsp;&nbsp;├&nbsp;&nbsp;{$scat.name}</option>
                                    <!--三级分类-->
                                    {if condition="isset($scat.children)"}
                                    {volist name="scat['children']" id="tcat"}
                                    <option value="{$tcat.id}" {if condition="$item.cid eq $tcat['id']" }selected{/if}>&nbsp;&nbsp;&nbsp;&nbsp;├&nbsp;&nbsp;{$tcat.name}</option>
                                    {/volist}
                                    {/if}
                                {/volist}
                                {/if}
                                {/volist}
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td width="90" align="right">产品品牌</td>
                        <td>
                            <input type="text" name="brand" value="{$item.brand}" size="50" class="inpMain"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="90" align="right">产品单位</td>
                        <td>
                            <input type="text" name="units" value="{$item.units}" size="10" placeholder="例：kg，个" class="inpMain"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">简单描述</td>
                        <td>
                            <textarea type="text" name="description" cols="80" rows="5" class="inpMain">{$item.description}</textarea>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">产品价格</td>
                        <td>
                            <input type="text" name="price" value="{$item.price}" size="10" placeholder="0.00" class="inpMain" required/> <font color="#FF0000"> * 单位：元</font>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">市场价格</td>
                        <td>
                            <input type="text" name="marketprice" value="{$item.marketprice}" size="10" placeholder="0.00" class="inpMain" required/> <font color="#FF0000"> * 单位：元</font>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="top">产品描述</td>
                        <td>
                             <!-- 富文本框 -->
                            {include file="public/editor" /}
                        </td>
                    </tr>
                    <tr>
                        <!--上传图片-->
                        {include file="public/upload" tip="产品图片" /}
                    </tr>
                    <tr>
                        <td align="right">关键字</td>
                        <td>
                            <input type="text" name="keywords" value="{$item.keywords}" size="50" class="inpMain"/>
                        </td>
                    </tr>
                    <tr>
                    <tr>
                        <td width="80" height="35" align="right">发布时间</td>
                        <td>
                            <input type="text" name="publishtime" value="{$item.publishtime||date='Y-m-d H:i'}" size="19" class="inpMain date-picker" />
                        </td>
                    </tr>
                        <td></td>
                        <td>
                            <input type="hidden" name="id" value="{$item.id}">
                            <span class="btn">提 交</span>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    <div class="clear"></div>
    {include file="public/footer" /}
    <div class="clear"></div>
</div>
<script type="text/javascript">
var art_pro_url = "{:url('product/edit')}";
 $.datetimepicker.setLocale('ch');//设置中文
    $(".date-picker").datetimepicker({
      format:"Y-m-d H:i",      //格式化日期
      timepicker:false,    //关闭时间选项
    });
</script>
</body>
</html>
